<!DOCTYPE html>
<html>
<head runat="server">
	<title>
		Login Successful
	</title>
	<link href="style.css" rel="Stylesheet" type="text/css" />
</head>

<body>
	<a name="top"></a>
	<div class="WebsiteBanner">Study Buddy</div>	
	<div class="PostContainer">	
		<div class="Post">
			<div class="PostHeader">
				Login Success!
			</div>
			<div class="PostContent">
				<p>
					Login successful.
				</p>
			</div>
		</div>
	</div>
	<div  id="BackToTop">
		<a href="#top">Back to Top</a>
	</div>
</body>
</html>

<?php
	if ($_SERVER['REQUEST_METHOD'] == 'GET' && isset($_GET['username']))
	{
		$username = $_GET['username'];
		echo ' <script>	self.location="event.php?event=renderClasses&username='. $username .'";</script>';
	}
	else
	{
		echo '<script>alert("No username was passed. Redirect to login page.");</script>';
		echo ' <script>	self.location="login.php";</script>';
	}
?>
